package test;

import java.util.Scanner;

public class Error {

	public static void main(String[] args) {
		
		System.out.println("请输入:");
		Scanner scanner = new Scanner(System.in);
		String a[] = new String[2];
		try {
			a[0] = scanner.next();
			a[2] = scanner.next();
		} catch (ArrayIndexOutOfBoundsException e) {
			System.out.println("总是被执行");
			e.printStackTrace();
		}
		//
		try {
			a[0] = scanner.next();
			a[1] = scanner.next();
			int c = Integer.parseInt(a[0]) / Integer.parseInt(a[1]);
			System.out.println(c);
		} catch (NumberFormatException e) {
			e.printStackTrace();
		} catch (ArithmeticException e) {
			e.printStackTrace();
		} finally {
			System.out.println("总是被执行");
		}

	}

}
